
#include "KeepDecipline.h"

KeepDecipline::KeepDecipline(void)
{
}

KeepDecipline::~KeepDecipline(void)
{
}

int const KeepDecipline::useDecipline(Matrix<int> const& data) const
{
	int result(0);
	for (size_t i = 0; i != data.size(); ++i)
	{
		result +=data.at(i);
	}
	result -= data.at(4);
	if (2 == result)
	{
		return data.at(4);
	}
	return 0;
}